<?php
define('IN_YCTOOL', true);
require_once('../config.php');
require_once(DIR_COMM . 'common.php');
if($_GET['u'])
{
    echo '<script language="javascript">
function query_get(key)
{
	fullurl = window.location.href.split("&");
	if(fullurl[key])
	{
		querystr = fullurl[key].split("=")[1];
		return querystr; 
	}
	return "";
}
document.location = "../reg.php?action=send&uid="+ query_get(0) +"&code=" + query_get(1);
</script>
    ';
    exit;
}
$c = $_GET['c'];
$healthy = array(0, 1, 2, 3, 4, 5, 6, 7, 8, 9);
$yummy   = array('u', 'I', 'g', 'O', 'j', 'v', 'n', 'l', 'a','r');
$c = str_replace($yummy, $healthy, $c);
$uid = ( ((($c - 9) / 3 + 1) / 7 - 3 ) / 53 ) - 5;
$code = func::passkeyEncode($uid);
//function query_get(key)
//{
//	fullurl = window.location.href.split("&");
//	if(fullurl[key])
//	{
//		querystr = fullurl[key].split("=")[1];
//		return querystr; 
//	}
//	return "";
//}
//document.location = "../admin.php?action=send&uid="+ query_get(0) +"&code=" + query_get(1);
echo '
<script language="javascript">
document.location = "../reg.php?action=send&uid='. $uid .'&code='. $code .'";
</script>
';
?>
